package com.smashcrush.client.gwt.service;

import java.util.List;

import com.google.code.jsonrpc.client.JsonRemoteService;
import com.google.code.jsonrpc.client.POST;
import com.google.code.jsonrpc.client.Path;
import com.google.code.jsonrpc.client.PathParam;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smashcrush.model.Script;

/**
 * The client side stub for the RPC service.
 */
public interface ScriptServiceAsync extends JsonRemoteService {

	public static class RPC {
		public static ScriptServiceAsync get() {
			ScriptServiceAsync ourInstance = GWT
					.create(ScriptServiceAsync.class);
			return ourInstance;
		}
	}

	@POST
	@Path("/api/script/token/{token}/saveScript")
	public void saveScript(@PathParam("token") String token, Script script,
			AsyncCallback<String> callback);

	@POST
	@Path("/api/script/token/{token}/getScripts")
	public void getScripts(@PathParam("token") String token,
			AsyncCallback<List<Script>> callback);

}
